<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8">
		<title>vue</title>
        <!-- 引入vue文件-->
		<script src="https://cdn.bootcss.com/vue/2.2.2/vue.min.js"></script>
	</head>
	<body>
		<!--绑定点击事件 -->
		<div id="vue">
			<button v-on:click="num +=1">增加1</button>
			<p> 这个按钮被点击了{{num}}次 </p>
		</div>
		<script>
			new Vue({
				el:'#vue',
				data:{
					num:0
				}
			})
		</script>
		<div id="v">
			<button v-on:click.stop="greet">弹出</button>
			<button v-on:click="say('hehe')">hehe</button>
			<button v-on:click="say('haha')">haha</button>
		</div>
		<script>
			new Vue({
				el:'#v',
				data:{
					name:"侯征"
				},
				methods:{
					greet:function(){
						alert("Hello,"+this.name)
					},
					say:function(message){
						alert(message)
					}
				}
			})
		</script>
	</body>
</html>
